<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>生成器</title>
</head>
<body>
<script>
    function * gen(args){
        console.log(args)
        let one = yield 111;
        yield 222;
        yield 333;
    }

    let iterator = gen('AAA');
    console.log(iterator.next());
    // console.log(iterator.next());

</script>
</body>
</html>